﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace MicropleSoft.Controls.QueryControls
{
    public partial class QueryItemString : MicropleSoft.Controls.QueryControls.QueryItemBase
    {
        public QueryItemString()
        {
            InitializeComponent();
        }

        public override string GetItemCondition()
        {
            if(!String.IsNullOrEmpty(this.FieldName))
            {
                return " and " +  this.FieldName + String.Format(" like '%{0}%'", this.xTextEdit1.Text.Trim());
            }
            return base.GetItemCondition();
        }
    }
}
